<?php

header("Content-type: text/plain");
header("Cache-Control: no-store, no-cache");

include_once("banco.php");

$login = $_GET["login"];
$senha = $_GET["senha"];

$link = pg_connect(URL);

$query = "select * from funcionario where login = '$login' and senha = md5('$senha')";
$result = pg_query($link, $query);
if(pg_num_rows($result) == 1) {
    echo "OK";
}else {
    echo "ER";
}

?>
